<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SkyGameEngine2d: Application类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="shpe.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SkyGameEngine2d
   &#160;<span id="projectnumber">0.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_application-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">Application类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>应用程序的实例  
 <a href="class_application.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_application_8h_source.html">Application.h</a>&gt;</code></p>
<div class="dynheader">
类 Application 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_application.png" usemap="#Application_map" alt=""/>
  <map id="Application_map" name="Application_map">
<area href="class_i_application.html" title="应用程序实例的接口" alt="IApplication" shape="rect" coords="0,0,85,24"/>
<area href="class_i_process_msg.html" title="程序消息处理接口" alt="IProcessMsg" shape="rect" coords="95,0,180,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a2154836f8ef55ce14b11ecdd2074cd04"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_application.html#a2154836f8ef55ce14b11ecdd2074cd04">run</a> () override</td></tr>
<tr class="memdesc:a2154836f8ef55ce14b11ecdd2074cd04"><td class="mdescLeft">&#160;</td><td class="mdescRight">开始运行程序  <a href="#a2154836f8ef55ce14b11ecdd2074cd04">更多...</a><br /></td></tr>
<tr class="separator:a2154836f8ef55ce14b11ecdd2074cd04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1d9a8e30266788c4681ab071e23ac41"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_application.html#ae1d9a8e30266788c4681ab071e23ac41">setPerFrameInterval</a> (double interval) override</td></tr>
<tr class="memdesc:ae1d9a8e30266788c4681ab071e23ac41"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置每帧的间隔  <a href="#ae1d9a8e30266788c4681ab071e23ac41">更多...</a><br /></td></tr>
<tr class="separator:ae1d9a8e30266788c4681ab071e23ac41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8ab95ad6780a8dd890ea2ff42e060de"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_application.html#aa8ab95ad6780a8dd890ea2ff42e060de">setAppDelegte</a> (<a class="el" href="class_i_app_delegate.html">IAppDelegate</a> *app_delegate) override</td></tr>
<tr class="memdesc:aa8ab95ad6780a8dd890ea2ff42e060de"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置APP 的代理  <a href="#aa8ab95ad6780a8dd890ea2ff42e060de">更多...</a><br /></td></tr>
<tr class="separator:aa8ab95ad6780a8dd890ea2ff42e060de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab432dda80ef72b058c3d125a9929207c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_i_application_view.html">IApplicationView</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_application.html#ab432dda80ef72b058c3d125a9929207c">getAppView</a> () const override</td></tr>
<tr class="memdesc:ab432dda80ef72b058c3d125a9929207c"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取应用程序的视图  <a href="#ab432dda80ef72b058c3d125a9929207c">更多...</a><br /></td></tr>
<tr class="separator:ab432dda80ef72b058c3d125a9929207c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20ba85c25e15c4977e24d4168ec97f88"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_application.html#a20ba85c25e15c4977e24d4168ec97f88">setWinMsgFilter</a> (const WinMsgFilter &amp;filter) override</td></tr>
<tr class="memdesc:a20ba85c25e15c4977e24d4168ec97f88"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置windows 消息的过滤器  <a href="#a20ba85c25e15c4977e24d4168ec97f88">更多...</a><br /></td></tr>
<tr class="separator:a20ba85c25e15c4977e24d4168ec97f88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30b4e91a477bf9bc37418e27c6d7984e"><td class="memItemLeft" align="right" valign="top">virtual const std::wstring &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_application.html#a30b4e91a477bf9bc37418e27c6d7984e">getAppDir</a> () override</td></tr>
<tr class="memdesc:a30b4e91a477bf9bc37418e27c6d7984e"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取程序的根目录  <a href="#a30b4e91a477bf9bc37418e27c6d7984e">更多...</a><br /></td></tr>
<tr class="separator:a30b4e91a477bf9bc37418e27c6d7984e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa53c2c035c42e63ef9cd24611ba26afc"><td class="memItemLeft" align="right" valign="top"><a id="aa53c2c035c42e63ef9cd24611ba26afc"></a>
virtual LRESULT&#160;</td><td class="memItemRight" valign="bottom"><b>processMsg</b> (HWND hwnd, UINT msg, WPARAM wParam, LPARAM IParam) override</td></tr>
<tr class="separator:aa53c2c035c42e63ef9cd24611ba26afc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:aab75115c6fe31295fd4dddd34f124c97"><td class="memItemLeft" align="right" valign="top"><a id="aab75115c6fe31295fd4dddd34f124c97"></a>
static <a class="el" href="class_i_application.html">IApplication</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getInstance</b> ()</td></tr>
<tr class="separator:aab75115c6fe31295fd4dddd34f124c97"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>应用程序的实例 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a30b4e91a477bf9bc37418e27c6d7984e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30b4e91a477bf9bc37418e27c6d7984e">&#9670;&nbsp;</a></span>getAppDir()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const std::wstring&amp; Application::getAppDir </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取程序的根目录 </p>
<dl class="section return"><dt>返回</dt><dd>std::wstring </dd></dl>

<p>实现了 <a class="el" href="class_i_application.html#a2795ab905dd3cda62100fd711819469a">IApplication</a>.</p>

</div>
</div>
<a id="ab432dda80ef72b058c3d125a9929207c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab432dda80ef72b058c3d125a9929207c">&#9670;&nbsp;</a></span>getAppView()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_i_application_view.html">IApplicationView</a>* Application::getAppView </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取应用程序的视图 </p>
<dl class="section return"><dt>返回</dt><dd>IApplicationView* </dd></dl>

<p>实现了 <a class="el" href="class_i_application.html#af63b439aae7dcdc68ee6164c68da34d6">IApplication</a>.</p>

</div>
</div>
<a id="a2154836f8ef55ce14b11ecdd2074cd04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2154836f8ef55ce14b11ecdd2074cd04">&#9670;&nbsp;</a></span>run()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int Application::run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>开始运行程序 </p>
<dl class="section return"><dt>返回</dt><dd>int </dd></dl>

<p>实现了 <a class="el" href="class_i_application.html#a2f319a593ceb036235698ef21795c1ba">IApplication</a>.</p>

</div>
</div>
<a id="aa8ab95ad6780a8dd890ea2ff42e060de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8ab95ad6780a8dd890ea2ff42e060de">&#9670;&nbsp;</a></span>setAppDelegte()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Application::setAppDelegte </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_i_app_delegate.html">IAppDelegate</a> *&#160;</td>
          <td class="paramname"><em>app_delegate</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置APP 的代理 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">AppDelegateInterface</td><td>* app_delegate 代理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void 开发者需要继承代理的接口，并且重写其中的函数，以实现一下特殊的功能 </dd></dl>

<p>实现了 <a class="el" href="class_i_application.html#a914b490d612d84aea7342d2c91d05627">IApplication</a>.</p>

</div>
</div>
<a id="ae1d9a8e30266788c4681ab071e23ac41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1d9a8e30266788c4681ab071e23ac41">&#9670;&nbsp;</a></span>setPerFrameInterval()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Application::setPerFrameInterval </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>interval</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置每帧的间隔 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">double</td><td>interval 每帧的间隔 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void 该API用来设置游戏的帧数，一般在 AppDelegte 中调用，默认帧数为 30 <em>app-&gt;setPerFrameInterval</em>(1/30.0f) </dd></dl>

<p>实现了 <a class="el" href="class_i_application.html#a22608c76912d983a2320f91cf7391a43">IApplication</a>.</p>

</div>
</div>
<a id="a20ba85c25e15c4977e24d4168ec97f88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20ba85c25e15c4977e24d4168ec97f88">&#9670;&nbsp;</a></span>setWinMsgFilter()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Application::setWinMsgFilter </td>
          <td>(</td>
          <td class="paramtype">const WinMsgFilter &amp;&#160;</td>
          <td class="paramname"><em>filter</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置windows 消息的过滤器 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td>WinMsgFilter &amp; filter 消息过滤器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void 消息过滤器 允许 开发者有机会自定义的处理 windows 消息，如果不需要 引擎继续处理该消息，则返回 <em>true，否则应该返回</em> <em>false</em> </dd></dl>

<p>实现了 <a class="el" href="class_i_application.html#a254c45075ef30082fc3292c48f63418e">IApplication</a>.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>C:/code/SkyGameEngine2d/src/win32/<a class="el" href="_application_8h_source.html">Application.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
